// title
h2 {
    padding: 2rem 0 .3rem;
}

h3 {
    padding: 1rem 0 .3rem;
}

h4 {
    padding: .5rem 0 .3rem;
}


.article_container img {
    max-width: calc(100% - .5rem) !important;
    display: block;
    margin: .5rem auto 1rem auto;
}

// math
.MathJax {
   padding: .5em;
   overflow-x: auto; 
   overflow-y: hidden;
}

// code line numbers
div[class*=language-].line-numbers-mode .line-numbers {
    padding-top: 1rem;
    line-height: 1.5;
    .line-number {
        height: 1.5em;
        &:hover {
            font-weight: 600;
        }
    }
}

div[class*=language-] pre, div[class*=language-] pre[class*=language-] {
    margin: 0 0 0 var(--code-ln-wrapper-width);
    code {
        padding: 0;
    }
}


// code block
div[class*=language-] {
    margin-bottom: 1rem;
    border: 2px solid transparent;
    &:hover {
        border: 2px solid var(--theme-color);
    }
    &::before {
        transition: color .5s,opacity .5s;
    }
    code {
        transition: color .5s;
        background-color: transparent;
        color: inherit;
    }
}


// copy button
div[class*=language-] > button.copy-code-button:not(.fancy) .copy-icon {
    position: absolute;
    top: .65rem;
    left: .65rem;
}


// macos
div[class*=language-].macos .line-numbers {
    padding-top: 2.5rem;
}

div[class*=language-].macos {
    box-shadow: 0 0 10px var(--card-shadow);
    overflow-x: auto;  // macos border radius
    -webkit-transform: translateZ(0);
    &:hover::before {
        opacity: 0;
    }
    &::before {
        position: initial;
        display: block;
        color: var(--c-text);
        background: var(--c-bg);
        line-height: 25px;
        font-weight: bold;
        text-align: center;
    }
    &::after {
        position: absolute;
        top: 7px;
        left: 10px;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: #fc625d;
        -webkit-box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
        box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
        content: ' ';
        border-right: hidden;
    }
}
